﻿
@{
    ViewBag.Title = Resources.WebStringsWeb.WebTitle;
    Layout = "~/Views/Shared/_LayoutMobile.cshtml";
}

@section css {
    <style>
        .IsException {
            color: red;
        }

        .IsNormal {
            color: blue;
        }

        .mui-bar ~ .mui-content .mui-scroll-wrapper {
            top: 44px;
            height: auto;
        }
        .mui-ellipsis {
            font-size: 15px;
        }
        .mui-ellipsis b {
            font-size: 15px;
        }
      
    </style>
}
<div ng-cloak ng-controller="FacAndEquController" ng-init="  PlaceId='@(Request.QueryString["PlaceId"].IsEmpty() ? "" : Request.QueryString["PlaceId"])';
                RoomId='@(Request.QueryString["RoomId"].IsEmpty() ? "" : Request.QueryString["RoomId"])';
                 PlaceName='@(Request.QueryString["PlaceName"].IsEmpty() ? "" : Request.QueryString["PlaceName"])';">
    <header class="mui-bar mui-bar-nav">
        @*<a id="menu" class="mui-action-menu mui-icon mui-icon-plus mui-pull-right" href="MDrillFormAdd"></a>*@
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
        <h1 class="mui-title" style="color:white;" ng-cloak>{{PlaceName}}-设施设备</h1>
    </header>
    <div class="mui-content">
        <div id="pullrefresh" class="mui-scroll-wrapper">
            <div class="mui-scroll" id="checklist">
                <ul class="mui-table-view mui-table-view-chevron mui-table-view-striped mui-table-view-condensed"  ng-init="
                SearchModel={};
                SearchModel.RoomId=RoomId;
                InitFireFacilityFormList();">
                    <li class="mui-table-view-cell" ng-show="DataList.length==0" style="height:150px;text-align:center;">暂无数据</li>
                    <li class="mui-table-view-cell" ng-repeat="x in DataList" id="{{x.Id}}">
                        @*<div style="position: absolute; top: 50%; right: 15px; -webkit-transform: translateY(-50%); transform: translateY(-50%);">
                                <span class="mui-icon mui-icon-more"></span>
                            </div>*@
                        @*<div class="mui-slider-right mui-disabled">
                                <a class="mui-btn mui-btn-green mui-icon mui-icon-search" href="MPlanFormDetail?Id={{x.Id}}"></a>
                                <button class="mui-btn mui-btn-red mui-icon mui-icon-trash" ng-click="MDeletePlanForm(x.Id);"></button>
                            </div>*@
                        <div class="mui-table mui-slider-handle">
                            <div class="mui-table-cell mui-col-xs-10">
                                <h4 class="mui-ellipsis">{{$index+1}}.{{x.DeviceName}}</h4>
                                <p class="mui-h6 mui-ellipsis"><b>责任部门：</b>{{x.DepartmentName}}</p>
                                <p class="mui-h6 mui-ellipsis"><b>管理频次：</b>{{x.ManageInterval}}</p>

                                <p class="mui-h6 mui-ellipsis"><b>维保单位(部门)：</b>{{x.CompanyName}}</p>
                                <p class="mui-h6 mui-ellipsis"><b>维保频次：</b>{{x.MaintenanceInterval}}</p>
                                <p class="mui-h6 mui-ellipsis"><b>状态：</b>{{x.Status|GetStatus}}</p>
                                <p ng-show="x.LastMaintance!=null" class="mui-h6 mui-ellipsis"><b>上次维保：</b>{{x.LastMaintance.MaintainceDate | JSONDate:'yyyy-MM-dd'}}</p>
                                <p ng-show="x.LastMaintance!=null" class="mui-h6 mui-ellipsis"><b>下次维保：</b>{{x.LastMaintance.NextDate|JSONDate:'yyyy-MM-dd'}}</p>

                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
@section js{
    <script src="~/Assets/js/mui.pullToRefresh.js"></script>
    <script src="~/Assets/js/mui.pullToRefresh.material.js"></script>
    <script src="~/Assets/js/pg/FacAndEqu.js?v=@DateTime.Now.ToString("yyyyMMddHHmm")"></script>

    <script>
        mui.init({
            swipeBack: false,
            keyEventBind: {
                backbutton: false  //关闭back按键监听
            }
        });

    </script>
}

